home *** CD-ROM | disk | FTP | other *** search
- # Login script for Access Nevada, Boulder City, NV - PPP
- #trace on
- #
- # initialize modem
- #
- sleep 4
- output atz\r
- input 10 OK\n
- #
- # set modem to indicate DCD
- #
- outputecho ATX4&C1&D2S7=60S11=60M1L1\r
- input 10 OK\n
- #
- # send phone number & repeat if busy
- #
- $result = "StopWarningMsg"
- %connect = 0
- %attempts = 100
- %n = 0
- repeat
- if %n = %attempts
- display \n\n "Tried " %n " times, Giving up."\n
- abort
- end
- %n = %n + 1
- outputecho ATDT294-5348\r
-
- # %nothing = [input 1 nothing]
- %timeout = [read 30 $result]
-
- # This loop protects from a null string being interpreted as being
- # a real answer.
-
- while $result = ""
- %timeout = [read 30 $result]
- end
-
- if %timeout = 0
- display "ERROR: Timed-out with no answer." \n
- set dtr off
- sleep 1
- output +++
- sleep 1
- output ath\r
- set dtr on
- end
-
- # Check if modem didn't even get a dialtone...
-
- if $result = "NO DIALTONE"
- display $result\n
- set dtr off
- sleep 1
- output +++
- sleep 1
- output ath\r
- set dtr on
- display "Stopped."\n
- abort
- end
-
- if $result = "BUSY"
- %connect = 0
- else
- if %timeout = 0
- display "Timeout."\n
- else
- display "Modem sez:" $result\n
- %connect = 1
- display "Connecting, waiting for prompt..."\n
- end
- end
- sleep 2
- until %connect
-
- #
- # now we are connected.
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- #wait 60 dcd
-
- display Connected to Access Nevada....
- #
- # send Login Id
- #
- input 20 :
- output useridhere\r
- #
- # and the password
- #
- input 20 assword:
- output passwdhere\r
- #
- display \nPlease wait...\n
- sleep 6
-
- input 30 Readyv